package com.medsys.view;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Date;

import com.medsys.util.Funcao;

public class Menu {
	
	private static Menu menu = new Menu();
	
	public static Menu getInstance(){
		return menu;
	}
	
	public void show() {
		System.out.println("*****************************************************");
		System.out.println("******** MedSys - Sistema de Controle Medico ********");
		System.out.println("*****************************************************");
		System.out.println("");
		System.out.println("***************** Modulo Paciente *******************");
		System.out.println("*  1 - Cadastrar(Validado)                           *");
		System.out.println("*  2 - Consultar(Validado por CPF e ID)              *");
		System.out.println("*  3 - Atualizar(Validado)                           *");
		System.out.println("*                                                    *");
		System.out.println("***************** Modulo Medico *********************");
		System.out.println("*  4 - Cadastrar(Validado)                           *");
		System.out.println("*  5 - Consultar(Validado por CRM e ID)              *");
		System.out.println("*  6 - Atualizar(Validado)                           *");
		System.out.println("*                                                    *");
		System.out.println("***************** Modulo Consulta ********************");
		System.out.println("*  7 - Cadastrar(Validado)                           *");
		System.out.println("*  8 - Consultar(Validado, nao traz receituario)     *");
		System.out.println("*  9 - Atualizar(Nao atualiza)                       *");
		System.out.println("*                                                    *");
		System.out.println("**************** Modulo Relatorio ********************");
		System.out.println("* 10 - Gerar PDF de agendamentos por periodo(Validado)*");
		System.out.println("* 11 - Gerar PDF da lista de pacientes(Validado)      *");
		System.out.println("* 12 - Gerar PDF do Receituario(Validado)            *");
		System.out.println("* 13 - Historico do Paciente(Validado)               *");
		System.out.println("* 14 - Atestado Medico(Implementar)                  *");
		System.out.println("*                                                    *");
		System.out.println("******************************************************");
		System.out.println("*  0 - Sair do Sistema                               *");
		System.out.println("******************************************************");
		System.out.println("");
		System.out.println("******************************************************");
		System.out.println("******************** By HardCode *********************");
		System.out.println("******************************************************");
		System.out.println("");
	}
	
	public int readInt(String msgPrompt) {
		System.out.print(msgPrompt);
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int in = 0;  
        try {
			in = Integer.parseInt(reader.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return in;
    }  

	public String readStr(String msgPrompt) {
		System.out.print(msgPrompt);
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String in = "";  
        try {
			in = reader.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return in;
    }  
	
	public Date readDate(String msgPrompt) {
		System.out.print(msgPrompt);
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String in = "";  
		try {
			in = reader.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return Funcao.formataData(in, true);
	}  
	
	public void exit() {		
		System.out.println("Saindo do sistema...");
    }
	

}
